package com.roger.springcloudGreenwich.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;

@ToString
@Getter
@Setter
@Mapping(mappingPath = "elasticsearch_mapping.json")//设置mapping
@Setting(settingPath = "elasticsearch_setting.json")//设置setting
@Document(indexName = "info", type = "block", shards = 5, replicas = 1, refreshInterval = "2s")
public class BlockInfoItem {
    /**
     * id
     */
    @Id
    private String id;

    @Field(type = FieldType.Keyword)
    private String preClosePx;

    @Field(type = FieldType.Text)
    private String blockTypeName;

    @Field(type = FieldType.Text,analyzer = "pinyin_analyzer",searchAnalyzer = "pinyin_analyzer")
    private String blockName;

    @Field(type = FieldType.Keyword)
    private String blockId;
}

